﻿<UserControl x:Class="LiveTiss.Guias.UserControls.DenteRegiao"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    mc:Ignorable="d" x:Name="ucDenteRegiao">

    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter"  />
    </UserControl.Resources>

    <Grid Margin="0,0,6,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.024*"/>
            <ColumnDefinition Width="0.976*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Margin="0" Grid.ColumnSpan="2" Grid.Column="2">
            <TextBlock TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="13.333" Text="Dente/Região:"/>

            <ComboBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" SelectedValue="Key" DisplayMemberPath="Value"
                ItemsSource="{Binding Path=Value.regiaoDenteItems, ElementName=ucDenteRegiao, Mode=OneWay}"
                SelectedIndex="{Binding Path=Value.ItemElementName, ElementName=ucDenteRegiao, Converter={StaticResource enumConverter}, ConverterParameter='DenteRegiao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                SelectionChanged="ComboBox_SelectionChanged"/>
            <!--ItemsSource="{Binding Path=Value.denteItems,ElementName=ucDenteRegiao,Mode=OneWay}"-->
            <ComboBox Name="cbxDente" Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" Visibility="Visible"
                        DisplayMemberPath="Value" SelectedValuePath="Key"
                        />
            <!-- ItemsSource="{Binding Path=Value.regiaoItems,ElementName=ucDenteRegiao,Mode=OneWay}"-->
            <ComboBox Name="cbxRegiao" Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" Visibility="Visible"
                        DisplayMemberPath="Value" SelectedValuePath="Key"
                        />
        </StackPanel>
    </Grid>
</UserControl>
